import type { LoginParams, LoginData } from '@/types/user'
import { request } from '@/utils/reuqest'



/**
 * @description: 登录函数
 * @param {*} data { mobile,password }
 * @return {*} promise
 */
export const loginAPI = (data: LoginParams) => {
  return request<LoginData>('/park/login', 'POST', data)
}



import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore('hm-user', () => {
  const token = ref('') 
  return { token }
})